package com.wit.witmg.mapper;

import com.wit.witmg.entity.TProdstock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2025-01-15
 */
public interface TProdstockMapper extends BaseMapper<TProdstock> {

    @Update("update t_prodstock set amount=amount+#{amount},qt=qt+#{inqt} where bn=#{bn}")
    boolean updateAmount(@Param("bn") String bn, @Param("amount")Double amount,@Param("inqt")Double inqt);

    @Update("update t_prodstock set pqt=pqt+#{qt} where bn=#{bn}")
    boolean updatePqt(@Param("bn") String bn,@Param("qt")Double qt);

}
